package com.neusoft.service.impl;

import com.neusoft.dao.AdminDao;
import com.neusoft.dao.impl.AdminDaoImpl;
import com.neusoft.model.Admin;
import com.neusoft.service.AdminService;

import java.util.List;

/**
 * @Author: duan
 * @Date: Create in 19:31 2020/10/19
 */
public class AdminServiceImpl implements AdminService {
    private AdminDao adminDao = new AdminDaoImpl();

    @Override
    public boolean insert(Admin bean) {
        return adminDao.insert(bean);
    }

    @Override
    public boolean update(Admin bean) {
        return adminDao.update(bean);
    }

    @Override
    public boolean delete(int id) {
        return adminDao.delete(id);
    }

    @Override
    public Admin getById(Integer id) {
        return adminDao.getById(id);
    }

    @Override
    public Admin getByUsernameAndPassword(String username, String password) {
        return adminDao.getByUsernameAndPassword(username, password);
    }

    @Override
    public List<Admin> getList() {
        return adminDao.getList();
    }

    @Override
    public List<Admin> getListByUsername(String username) {
        return adminDao.getListByUsername(username);
    }
}
